<?php
use tpfcore\Core;
?>
<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<!-- Set render engine for 360 browser -->
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<!-- HTML5 shim for IE8 support of HTML5 elements -->
	<!--[if lt IE 9]>
		<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js">
		</script>
	<![endif]-->
	<link href="{$admin_assets_path}/css/theme.min.css" rel="stylesheet">
	<link href="{$admin_assets_path}/css/simplebootadmin.css" rel="stylesheet">
	<link href="{$admin_assets_path}/css/default.css" rel="stylesheet" />
	<link href="{$admin_assets_path}/css/font-awesome.min.css"
	rel="stylesheet" type="text/css">
	<style>
		.length_3{width: 180px;} form .input-order{margin-bottom: 0px;padding:3px;width:40px;}
		.table-actions{margin-top: 5px; margin-bottom: 5px;padding:0px;} .table-list{margin-bottom:
		0px;}
		#channel_id option:nth-child(n+1){color: #F00;}

	</style>
	<!--[if IE 7]>
		<link rel="stylesheet" href="{$admin_assets_path}/css/font-awesome-ie7.min.css">
	<![endif]-->
	<script type="text/javascript">
		//全局变量
		var GV = {
			WEB_ROOT:"",
			DIMAUB: "/",
			JS_ROOT: "/theme/backend/assets/js/",
			TOKEN: ""
		};
	</script>
	<!-- Le javascript==================================================-
	-> <!-- Placed at the end of the document so the pages load faster -->
	<script src="{$admin_assets_path}/js/jquery.js"></script>
	<script src="{$admin_assets_path}/js/wind.js"></script>
	<script src="{$admin_assets_path}/js/bootstrap.min.js"></script>
</head>
<body>
	<div class="wrap">
	<ul class="nav nav-tabs">
		<li><a href="{:url("cms/category/index")}">分类管理</a></li>
		<li><a href="{:url("cms/category/add")}">添加分类</a></li>
		<li class="active"><a href="{:url("cms/category/edit")}">编辑分类</a></li>
	</ul>
	<form method="post" class="form-horizontal js-ajax-form" action="">
		<fieldset>
			<div class="control-group">
				<label class="control-label">上级:</label>
				<div class="controls">
					<select name="parentid">
						<option value="0">作为一级分类</option>
						{$categorys}
					</select>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">分类名称:</label>
				<div class="controls">
					<input type="text" name="title" value="{$list->title}">
					<span class="form-required">*</span>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">内容模型:</label>
				<div class="controls">
					<select name="channel_id" id="channel_id">
						<option value="">请选择内容模型</option>
						{volist name=":config('config.cms_channel')" id="vo"}
						<option value="{$key}" {eq name="key" value="$list->channel_id"}selected{/eq}>{$vo.name} | {$vo.key}</option>
						{/volist}
					</select>
					<span class="form-required">*</span>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">是否作为导航:</label>
				<div class="controls">
					<label><input type="radio" name="isnav" value="1" {if condition="$list->isnav eq 1"}checked{/if}> 是</label>
					<label><input type="radio" name="isnav" value="0" {if condition="$list->isnav eq 0"}checked{/if}> 否</label>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">是否显示:</label>
				<div class="controls">
					<label><input type="radio" name="display" value="1" {if condition="$list->display eq 1"}checked{/if}> 是</label>
					<label><input type="radio" name="display" value="0" {if condition="$list->display eq 0"}checked{/if}> 否</label>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">链接地址:</label>
				<div class="controls">
					<input type="text" name="url" id="url" value="{$list->url}">
					<span class="form-required"></span>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">排序:</label>
				<div class="controls">
					<input type="text" name="sort" value="{$list->sort}">
					<span class="form-required"></span>
				</div>
			</div>
		</fieldset>
		<div class="form-actions">
			<button type="submit" class="btn btn-primary js-ajax-submit">确定操作</button>
			<a class="btn" href="javascript:history.back(-1);">返回</a>
		</div>
	</form>
</div>
	<script src="{$admin_assets_path}/js/common.js"></script>
</body>
</html>